<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>

<title>StringPrintWriter (randoop 4.1.0 API)</title>

<link rel="stylesheet" type="text/css" href="../../javadocstyle.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="StringPrintWriter (randoop 4.1.0 API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../randoop/util/StringEscapeUtils.html" title="class in randoop.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../randoop/util/TestCoverageInfo.html" title="class in randoop.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?randoop/util/StringPrintWriter.html" target="_top">Frames</a></li>
<li><a href="StringPrintWriter.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.java.io.PrintWriter">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">randoop.util</div>
<h2 title="Class StringPrintWriter" class="title">Class StringPrintWriter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">java.io.Writer</a></li>
<li>
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">java.io.PrintWriter</a></li>
<li>
<ul class="inheritance">
<li>randoop.util.StringPrintWriter</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">StringPrintWriter</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a></pre>
<div class="block">A PrintWriter that maintains a String as its backing store.

 <p>Usage:

 <pre>
 StringPrintWriter out = new StringPrintWriter();
 printTo(out);
 System.out.println(out.getString());
 </pre></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.java.io.PrintWriter">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;java.io.<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#out" title="class or interface in java.io">out</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.java.io.Writer">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;java.io.<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true#lock" title="class or interface in java.io">lock</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../randoop/util/StringPrintWriter.html#StringPrintWriter--">StringPrintWriter</a></span>()</code>
<div class="block">Constructs a new instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../randoop/util/StringPrintWriter.html#StringPrintWriter-int-">StringPrintWriter</a></span>(int&nbsp;initialSize)</code>
<div class="block">Constructs a new instance using the specified initial string-buffer size.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../randoop/util/StringPrintWriter.html#getString--">getString</a></span>()</code>
<div class="block">Since toString() returns information *about* this object, we want a separate method to extract
 just the contents of the internal buffer as a String.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.io.PrintWriter">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.io.<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#append-char-" title="class or interface in java.io">append</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#append-java.lang.CharSequence-" title="class or interface in java.io">append</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#append-java.lang.CharSequence-int-int-" title="class or interface in java.io">append</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#checkError--" title="class or interface in java.io">checkError</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#clearError--" title="class or interface in java.io">clearError</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#close--" title="class or interface in java.io">close</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#flush--" title="class or interface in java.io">flush</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#format-java.util.Locale-java.lang.String-java.lang.Object...-" title="class or interface in java.io">format</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#format-java.lang.String-java.lang.Object...-" title="class or interface in java.io">format</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-boolean-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-char-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-char:A-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-double-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-float-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-int-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-long-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-java.lang.Object-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#print-java.lang.String-" title="class or interface in java.io">print</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#printf-java.util.Locale-java.lang.String-java.lang.Object...-" title="class or interface in java.io">printf</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#printf-java.lang.String-java.lang.Object...-" title="class or interface in java.io">printf</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println--" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-boolean-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-char-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-char:A-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-double-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-float-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-int-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-long-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-java.lang.Object-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#println-java.lang.String-" title="class or interface in java.io">println</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#setError--" title="class or interface in java.io">setError</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#write-char:A-" title="class or interface in java.io">write</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#write-char:A-int-int-" title="class or interface in java.io">write</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#write-int-" title="class or interface in java.io">write</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#write-java.lang.String-" title="class or interface in java.io">write</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true#write-java.lang.String-int-int-" title="class or interface in java.io">write</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="StringPrintWriter--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>StringPrintWriter</h4>
<pre>public&nbsp;StringPrintWriter()</pre>
<div class="block">Constructs a new instance.</div>
</li>
</ul>
<a name="StringPrintWriter-int-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StringPrintWriter</h4>
<pre>public&nbsp;StringPrintWriter(int&nbsp;initialSize)</pre>
<div class="block">Constructs a new instance using the specified initial string-buffer size.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>initialSize</code> - an int specifying the initial size of the buffer</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getString--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getString()</pre>
<div class="block">Since toString() returns information *about* this object, we want a separate method to extract
 just the contents of the internal buffer as a String.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the contents of the internal string buffer</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../randoop/util/StringEscapeUtils.html" title="class in randoop.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../randoop/util/TestCoverageInfo.html" title="class in randoop.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?randoop/util/StringPrintWriter.html" target="_top">Frames</a></li>
<li><a href="StringPrintWriter.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.java.io.PrintWriter">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
